//
//  MatchAddChildVC.m
//  WatchBall
//
//  Created by lanou3g on 15/6/2.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//


#import "MatchAddChildVC.h"
#import "NewsTableViewController.h"


@implementation MatchAddChildVC
+ (void)getChildWithMatchVC:(MatchViewController *)matchVC {
    
    MatchTVC *childCSLVC = [[MatchTVC alloc]initWithStyle:UITableViewStylePlain useHomePW:CSLMatchHomePageWebSite refreshFrontWeb:CSLMatchWebRefreshWebSitFront behindWeb:CSLMatchWebRefreshWebSitBehind detailWeb:CSLMatchWebDetail];
    
    [matchVC addChildViewController:childCSLVC];
    childCSLVC.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
    childCSLVC.tableView.separatorColor = [UIColor colorWithRed:60/256.0 green:90/256.0 blue:121/256.0 alpha:1.0];
    childCSLVC.tableView.backgroundColor = [UIColor colorWithRed:250/256.0 green:250/256.0 blue:250/256.0 alpha:1.0];
    childCSLVC.tableView.separatorInset = UIEdgeInsetsMake(0,(CGRectGetWidth([UIScreen mainScreen].bounds)-270)/2, 0,(CGRectGetWidth([UIScreen mainScreen].bounds)-270)/2);
    CGRect CSLframe =matchVC.matchScrollV.bounds;
    CSLframe.origin.x = CGRectGetWidth(matchVC.matchScrollV.bounds)*1;
    childCSLVC.view.frame = CSLframe;
    [matchVC.matchScrollV addSubview:childCSLVC.view];
    
   
    
    
    MatchTVC *childCBAVC = [[MatchTVC alloc]initWithStyle:UITableViewStylePlain useHomePW:CBAMatchHomePageWebSite refreshFrontWeb:CBAMatchWebRefreshWebSitFront behindWeb:CBAMatchWebRefreshWebSitBehind detailWeb:CBAMatchWebDetail];
    
    [matchVC addChildViewController:childCBAVC];
    CGRect CBAframe = matchVC.matchScrollV.bounds;
    CBAframe.origin.x = CGRectGetWidth(matchVC.matchScrollV.bounds)*0;
    childCBAVC.view.frame = CBAframe;
    childCBAVC.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
    childCBAVC.tableView.separatorColor = [UIColor colorWithRed:60/256.0 green:90/256.0 blue:121/256.0 alpha:1.0];
    childCBAVC.tableView.separatorColor = [UIColor colorWithRed:60/256.0 green:90/256.0 blue:121/256.0 alpha:1.0];
    childCBAVC.tableView.separatorInset = UIEdgeInsetsMake(0,(CGRectGetWidth([UIScreen mainScreen].bounds)-270)/2, 0,(CGRectGetWidth([UIScreen mainScreen].bounds)-270)/2);
    [matchVC.matchScrollV addSubview:childCBAVC.view];

    
    
    MatchTVC *childUEFACL = [[MatchTVC alloc]initWithStyle:UITableViewStylePlain useHomePW:UEFACMatchHomePageWebSite refreshFrontWeb:UEFACMatchWebRefreshWebSitFont behindWeb:UEFACMatchWebRefreshWebSitBehind detailWeb:UEFACMatchWebDetail];
    childUEFACL.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
    childUEFACL.tableView.separatorColor = [UIColor colorWithRed:60/256.0 green:90/256.0 blue:121/256.0 alpha:1.0];
    childUEFACL.tableView.separatorColor = [UIColor colorWithRed:60/256.0 green:90/256.0 blue:121/256.0 alpha:1.0];
    childUEFACL.tableView.separatorInset = UIEdgeInsetsMake(0,(CGRectGetWidth([UIScreen mainScreen].bounds)-270)/2, 0,(CGRectGetWidth([UIScreen mainScreen].bounds)-270)/2);

    [matchVC addChildViewController:childUEFACL];
    CGRect UEFACLframe = matchVC.matchScrollV.bounds;
    UEFACLframe.origin.x = CGRectGetWidth(matchVC.matchScrollV.bounds)*2;
    childUEFACL.view.frame = UEFACLframe;
    
    [matchVC.matchScrollV addSubview:childUEFACL.view];
    
    
    MatchTVC *SERIVC = [[MatchTVC alloc]initWithStyle:UITableViewStylePlain useHomePW:SERIMatchHomePageWebSite refreshFrontWeb:SERIMatchWebRefreshWebSitFront behindWeb:SERIMatchWebRefreshWebSitBehind detailWeb:SERIMatchWebDetail];
    CBAframe.origin.x = CGRectGetWidth(matchVC.matchScrollV.bounds)*3;
    SERIVC.view.frame = CBAframe;
    SERIVC.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
    SERIVC.tableView.separatorColor = [UIColor colorWithRed:60/256.0 green:90/256.0 blue:121/256.0 alpha:1.0];
    SERIVC.tableView.separatorColor = [UIColor colorWithRed:60/256.0 green:90/256.0 blue:121/256.0 alpha:1.0];
    
    SERIVC.tableView.separatorInset = UIEdgeInsetsMake(0,(CGRectGetWidth([UIScreen mainScreen].bounds)-270)/2, 0,(CGRectGetWidth([UIScreen mainScreen].bounds)-270)/2);

    [matchVC addChildViewController:SERIVC];
    [matchVC.matchScrollV addSubview:SERIVC.view];
    
    
    
}


+ (void)getChildWithNewsVC:(NewsViewController *)newsVC{
    CGRect frame = newsVC.newsScrollV.bounds;
    
    
    
    NewsTableViewController *CSLVC = [[NewsTableViewController alloc]initWithStyle:UITableViewStylePlain useHomePage:CSLNewsHomePageWebSite refreshWeb:CSLNewsWebRefresh
                                                                           detailWeb:CSLNewsWebDetail];
    frame.origin.x = CGRectGetWidth(newsVC.newsScrollV.bounds)*1;
    CSLVC.view.frame = frame;
    [newsVC addChildViewController:CSLVC];
    [newsVC.newsScrollV addSubview:CSLVC.view];
    
    
    NewsTableViewController *CBAVC = [[NewsTableViewController alloc]initWithStyle:UITableViewStylePlain useHomePage:CBANewsWebHomePageWebSite refreshWeb:CBANewsWebRefreshWebSitBehind detailWeb:CBANewsWebDetail];
    frame.origin.x =0;
    CBAVC.view.frame = frame;
    [newsVC addChildViewController:CBAVC];
    [newsVC.newsScrollV addSubview:CBAVC.view];
    
    
    NewsTableViewController *UEFAVC = [[NewsTableViewController alloc]initWithStyle:UITableViewStylePlain useHomePage:UEFACNewsHomePageWebSit refreshWeb:UEFACNewsRefreshWebSit detailWeb:UEFACNewsDetailWebSit];
    frame.origin.x = CGRectGetWidth(newsVC.newsScrollV.bounds)*2;
    UEFAVC.view.frame = frame;
    
    [newsVC addChildViewController:UEFAVC];
    [newsVC.newsScrollV addSubview: UEFAVC.view];
    
    NewsTableViewController *SERIVC = [[NewsTableViewController alloc]initWithStyle:UITableViewStylePlain useHomePage:SERINewsHomePageWebSite refreshWeb:SERINewsWebRefresh detailWeb:SERINewsWebDetail];
    
    frame.origin.x  = CGRectGetWidth(newsVC.newsScrollV.bounds)*3;
    SERIVC.view.frame = frame;
    
    [newsVC addChildViewController:SERIVC];
    [newsVC.newsScrollV addSubview:SERIVC.view];

    
    
}






@end
